import request from '@/utils/request'

// 登录方法
export function login(username, password, code, uuid) {
  return request({
    url: '/prod-api/auth/login',
    method: 'post',
    data: { username, password, code, uuid }
  })
}

// 刷新方法
export function refreshToken() {
  return request({
    url: '/prod-api/auth/refresh',
    method: 'post'
  })
}

export function refreshTokenTwo() {
  return request({
    url: '/prod-api/auth/refreshToken',
    method: 'post'
  })
}



// 获取用户详细信息
export function getInfo() {
  return request({
    url: '/prod-api/system/user/getInfo',
    method: 'get'
  })
}

// 退出方法
export function logout() {
  return request({
    url: '/prod-api/auth/logout',
    method: 'delete'
  })
}

// 获取验证码
export function getCodeImg() {
  return request({
    url: '/code',
    method: 'get'
  })
}


// 注册
export function register(data) {
  //let data ={phonenumber:phonenumber,password:password,code:code,platformUid:1}
  return request({
    url: '/prod-api/system/user/register',
    method: 'post',
    data:data
  })
}
// 重置密码
export function resetUserPwds(data) {
  return request({
    url: '/prod-api/system/user/updateUserPass',
    method: 'put',
    data: data
  })
}
